#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
//#include <QTableView>
#include "delegate.h"
#include "delegateTemplate.h"
//#include "QPushButton"
#include "filewidget.h"

class QTextEdit;
class QStandardItemModel;
class QHBoxLayout;
class QDomDocument;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow();
    ~MainWindow();
protected:
    void closeEvent(QCloseEvent *event);
private slots:
    void open();
    bool save();
    bool saveAs();
    void openXML();
    void openFileToCompare();
    void compareFiles();

private:
    void createActions();
    void createMenus();
    void createToolBar();
    void setEnabledActions(bool openAction,
                           bool saveAction,
                           bool saveAsAction,
                           bool compareAction,
                           bool templateXMLAction,
                           bool startToCompare);
    bool okToContinue();

    QMenu *fileMenu;
    QToolBar *toolBar;
    QAction *openAction;
    QAction *saveAction;
    QAction *saveAsAction;
    QAction *compareAction;
    QAction *templateXMLAction;
    QAction *startToCompare;
    QWidget *centralWidget;
    QHBoxLayout *layout;
    fileWidget *file;
};
#endif // MAINWINDOW_H
